from lxml import etree
import requests
from fake_useragent import UserAgent

url="https://www.dongqiudi.com/data/4"
headers={
    "User-Agent":UserAgent().chrome
}
response=requests.get(url,headers=headers)
e=etree.HTML(response.text)
th=e.xpath('//p[@class="th"]/span/text()')
td=e.xpath('//p[@class="td"]/span/text()')
team_icon=e.xpath('//span[@class="team-icon"]/b/text()')
for k in range(len(th)):
    print(th[k],end="            ")
print()
for i in range(len(team_icon)):
    count=0
    print(td[9*i]+"             "+team_icon[i],end="            ")#end=""阻止换行
    while(count<8):
        print(td[9*i+count+1],end="            ")
        count=count+1

    print()
